Product
Introducing Ruby Support in Socket
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
@babel/plugin-transform-object-rest-spread
Advanced tools
Compile object rest and spread to ES5
The @babel/plugin-transform-object-rest-spread package allows developers to use the object rest and spread properties syntax in their JavaScript code. This syntax is part of the ECMAScript 2018 (ES9) specification and enables more concise and readable code when copying properties from one object to another or collecting the remaining properties of an object after certain properties have been extracted.
Object Spread Properties
Allows an object's own enumerable properties to be copied into a new object. This is useful for creating a new object with the same properties as an existing object or for combining multiple objects into one.
{...source}
Object Rest Properties
Enables extracting properties from objects and binding the remaining properties to a new object. This is useful for object destructuring, where you want to separate certain properties from the rest of the properties in an object.
{a, b, ...rest}
This is a legacy Babel plugin that was used before the functionality was included in the official Babel preset. It offers similar functionality to @babel/plugin-transform-object-rest-spread but may not be as up-to-date with the latest Babel versions and ECMAScript specifications.
Compile object rest and spread to ES5
See our website @babel/plugin-transform-object-rest-spread for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-object-rest-spread
or using yarn:
yarn add @babel/plugin-transform-object-rest-spread --dev
v7.25.8 (2024-10-10)
babel-core
resolvePlugin
/resolvePreset
(@nicolo-ribaudo)babel-parser
, babel-plugin-proposal-async-do-expressions
, babel-plugin-proposal-destructuring-private
, babel-plugin-proposal-do-expressions
, babel-plugin-proposal-explicit-resource-management
, babel-plugin-proposal-export-default-from
, babel-plugin-proposal-function-bind
, babel-plugin-proposal-function-sent
, babel-plugin-proposal-import-defer
, babel-plugin-proposal-partial-application
, babel-plugin-proposal-throw-expressions
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-class-static-block
, babel-plugin-transform-dynamic-import
, babel-plugin-transform-export-namespace-from
, babel-plugin-transform-json-strings
, babel-plugin-transform-logical-assignment-operators
, babel-plugin-transform-nullish-coalescing-operator
, babel-plugin-transform-numeric-separator
, babel-plugin-transform-object-rest-spread
, babel-plugin-transform-optional-catch-binding
, babel-plugin-transform-optional-chaining
, babel-plugin-transform-private-property-in-object
, babel-preset-env
FAQs
Compile object rest and spread to ES5
The npm package @babel/plugin-transform-object-rest-spread receives a total of 14,383,221 weekly downloads. As such, @babel/plugin-transform-object-rest-spread popularity was classified as popular.
We found that @babel/plugin-transform-object-rest-spread demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.